home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / windows / pwfax.zip / STARTUP.WAS < prev   
Text File  |  1992-08-15  |  940b  |  24 lines

  1. ;STARTUP.WAS
  2. #define FAX "WINFAX PRO Administrator"   ; caption of Fax program window
  3. proc main
  4. string str
  5. integer win
  6.    if strfind $lastmsg "Port in use"   ; Fax may be using COM port
  7.       if activatewin FAX   ; if able to activate Fax program...
  8.          win = $ACTIVEWIN   ; handle of Fax program window
  9.          statmsg "Closing WINFAX PRO..."   ; inform user
  10.          closewin win   ; try to close Fax program
  11.          while iswindow win   ; while Fax is still running...
  12.             pause 1   ; give Fax a chance to close
  13.             if iswindow win   ; if Fax still running...
  14.                closewin win   ; try again to close Fax
  15.             endif
  16.          endwhile
  17.          fetch connection type str   ; COM was not initialized...
  18.          set connection type str   ; so reinitialize the COM port
  19.       else   ; couldn't activate Fax - let user handle the error
  20.          exit
  21.       endif
  22.    endif
  23. endproc
  24.